<div id="TournamentManagementViewModel">
    <h1>
        Crea un nuevo torneo
    </h1>
    <div class="col-lg-6 well bs-component">
        <form class="form-horizontal" role="form" data-toggle="validator">
            <fieldset>
                <legend>
                    <?php echo Yii::t('tournament_management', 'New tournament'); ?>
                </legend>
                <div class="form-group">
                    <label for="inputName" class="col-lg-2 control-label">
                        <?php echo Yii::t('tournament_management', 'Name'); ?>
                    </label>
                    <div class="col-lg-10">
                        <input type="text" class="form-control" id="inputName" placeholder="Name" data-error-required="no"
                               data-bind="event: { change: checkTournamentName }" required>
                           <div id="error-name" class="help-block with-errors "></div>
                    </div>
                 
                </div>

                <div class="form-group">
                    <label for="textArea" class="col-lg-2 control-label">
                        <?php echo Yii::t('tournament_management', 'Description'); ?>
                    </label>
                    <div class="col-lg-10">
                        <textarea class="form-control" rows="3" id="textArea"></textarea>
                        <span class="help-block">
                            <?php echo Yii::t('tournament_management', 'Add a description of your tournament'); ?>
                        </span>
                    </div>
                </div>
                <h3>
                    <?php echo Yii::t('tournament_management', 'Do you want your tournament to be public?'); ?>
                </h3>
                <div class="form-group">

                    <label class="col-lg-2 control-label">
                        <?php echo Yii::t('tournament_management', 'Public'); ?>
                    </label>

                    <div class="col-lg-10">
                        <label class=" control-label">
                            <input type="radio" name="optionsRadios" id="optionsRadios1" value="public" checked="">
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">
                        <?php echo Yii::t('tournament_management', 'Private'); ?>

                    </label>
                    <div class="col-lg-10">
                        <label class=" control-label"> 
                            <input type="radio" name="optionsRadios" id="optionsRadios2" value="private">
                        </label>

                        <input type="password" class="form-control" id="inputPassword" placeholder="<?php echo Yii::t('tournament_management', 'Password'); ?>">
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputUsers" class="col-lg-2 control-label">
                        <?php echo Yii::t('tournament_management', 'Users'); ?>
                    </label>
                    <div class="col-lg-10">
                        <textarea class="form-control" rows="3" id="Users"></textarea>
                        <span class="help-block">
                            <?php echo Yii::t('tournament_management', 'Add an e-mail for each user separated by commas'); ?>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-10 col-lg-offset-2">
                        <button class="btn btn-default"><?php echo Yii::t('tournament_management', 'Cancel'); ?></button>
                        <button type="submit" class="btn btn-primary"><?php echo Yii::t('tournament_management', 'Create'); ?></button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</div>

<script src="/public/js/TournamentManagementViewModel.js" type="text/javascript"></script>
<script>
	var tournamentManagementViewModel = new TournamentManagementViewModel();
	$( document ).ready( function(){ ko.applyBindings( 
                    tournamentManagementViewModel, document.getElementById( 'TournamentManagementViewModel' ) ); } );
</script>